package test.design.chain.servlet;

import org.apache.commons.lang3.StringUtils;

import test.design.chain.Request;
import test.design.chain.Response;

public class CheckFilter implements Filter {

	@Override
	public void doFilter(Request request, Response response, Chain chain) {
		if(StringUtils.isNotBlank(request.in)) {
			System.out.println("checkFilter pass...");
			response.out += "-check";
			chain.doFilter(request, response);
		} else {
			System.out.println("checkFilter forbidden...");
		}
	}

	@Override
	public void doFilter(Request request, Response response) {
		
	}

}
